import cv2
from cv2 import cv
import numpy as np
from wraps import Contour, Point
from recognition import Recognizer


def main():
    cv.NamedWindow("original", cv.CV_WINDOW_AUTOSIZE)
    cam = cv2.VideoCapture(0)

    while True:
        ret, frame = cam.read()
        r = Recognizer(frame)
        keyboard_image = r.get_keyboard()

        cv2.imshow('original', frame)
        
        if cv2.waitKey(10) == 27:  # Escape code
            break

    cv2.destroyAllWindows()


if __name__ == '__main__':
    main()
